package com.flong.scala.chapter1

/**
 * @Author:liangjl
 * @Date: 2020/7/30-12:28
 * @Eamil:jilongliang@sina.com
 * @Description:
 */
object Test2 extends App {

  helloWorld
  //sayNothing

  //在Scala中，方法没有形参的化，方法的括号可以省略
  def helloWorld(): Unit = {
    println("此方法是没有型参数，调用括号可以省略")
  }

  //Nothing是所有类的子类
  def sayNothing(): Nothing = {
    throw new Exception("抛出异常~~!")
  }


  def testChar(): Unit = {
    val char1 = 'c'
    println(char1)

  }

  testChar

}
